include("shared.lua")
include("scale.lua")
include("surface_new.lua")

local BlueScore = 0;
local RedScore = 0;
local GoalToReach = 0;

usermessage.Hook("GoalToReach",function(um)
	GoalToReach = um:ReadString()
end)

usermessage.Hook("RunCommand", function(um)
	chat.AddText(Color(255,255,255), tostring(um:ReadEntity():Nick()).. " Ran Command ".. tostring(um:ReadString()))	
end)

usermessage.Hook("BlueScore", function(um)
	BlueScore = um:ReadShort()
end)

usermessage.Hook("RedScore", function(um)
	RedScore = um:ReadShort()
end)

hook.Add("HUDPaint","Score", function()
	
	surface.TextPos("Blue Score: "..tostring(BlueScore),ScreenScaleW(200),ScreenScaleH(5),22, 150, 225, 255)
	surface.TextPos("[--Goal to Reach: ".. GoalToReach .."--]",ScreenScaleW(280),ScreenScaleH(5),255, 150, 225, 255)
	surface.TextPos("Red Score: "..tostring(RedScore),ScreenScaleW(390),ScreenScaleH(5),255, 100, 40, 255)
	draw.RoundedBoxEx( 16, ScreenScaleW(190), ScreenScaleH(0), ScreenScaleW(260), ScreenScaleH(16), Color(0,0,0,100), false, false, true, true )
	
end)